package com.example.h5shell;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;


import com.example.h5shell.databinding.ActivityBindingBinding;
import com.example.h5shell.entity.User;

public class BindingActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // ActivityBindingBinding 自动生产类，是R.layout.activity_binding驼峰+Binding
        ActivityBindingBinding bing = DataBindingUtil.setContentView(this, R.layout.activity_binding);
        User user = new User("docker", 10, "");
        bing.setUser(user);


        User user1 = new User("docker", 10, "");
        user1.setName("dockerasdad");

        bing.setUser(user1);
    }

}